﻿package Memoir 
{
	/**
	 * Game state for the opening.
	 */
	import org.flixel.*;
	
	public class MenuState extends FlxState
	{
		[Embed(source='../Assets/MissBrooks.ttf', fontFamily="brooks",embedAsCFF="false")] private var Brooks:String;
	//	[Embed(source='../Assets/valerie.ttf', fontFamily="val",embedAsCFF="false")] private var Val:String;
		[Embed(source='../Assets/segoesc.ttf', fontFamily="segoe",embedAsCFF="false")] private var Segoe:String;
		
		public function MenuState():void
		{
			var txt:FlxText;
			txt = new FlxText(0, 200, FlxG.width, "Memoir");
			txt.setFormat("brooks", 192, 0xFFFFFF, "center")
			this.add(txt);
			
			txt = new FlxText(0, FlxG.height-80, FlxG.width, "by Jessica Hartford");
			txt.setFormat('segoe', 20, 0xFFFFFF, "center")
			this.add(txt);
		}
			
		override public function update():void {
			if (FlxG.keys.pressed("X") || FlxG.mouse.justReleased())
			{
				FlxG.fade.start(0xff000000, 1, onFade);
			}		
			super.update();
		}
	
		private function onFade():void 
		{
			FlxG.state = new Memoir.OldLadyState(0,0);
		}
		
	}
}